The present invention relates to a microcomputer which is provided with an SRAM (static random access memory) and can store a large amount of data in the SRAM with certainty and at high speed, and more particularly relates to a microcomputer having an error-correcting function to improve reliability thereof.
An SRAM, which has low power consumption and is simple in circuit construction, has hitherto been used as a conventional memory of a microcomputer. In the SRAM, however, an unspecified bit is sometimes inverted by the influence of an .alpha.-ray or the like.
As a countermeasure for correcting such an error, various methods of detecting and correcting an error by the use of a microcomputer have been devised. For example, in one of the methods, a plurality of redundant bits for detecting and correcting an error are added to each address, and, in another method, parities of stored data in vertical and horizontal directions are provided and checked.
In the former method, however, it is necessary to store a plurality of redundant bits for detecting and correcting an error at every address. Accordingly, the former method has a drawback that an SRAM must have a storage capacity greater than that required to store information data. On the other hand, in the latter method, whenever it becomes necessary to rewrite data stored in an SRAM, all data in an associated block of the SRAM have to be read out in order to check a horizontal parity. Here, "an associated block" implies any arbitrarily chosen "associated" block which appears in the following description. Consequently, the latter method has a drawback that it takes a lot of time to rewrite data stored in the SRAM.